]> git.neil.brown.name Git - wiggle.git/log
wiggle.git
11 years agoUpdate version to 0.9.1 wiggle-0.9.x v0.9.1
NeilBrown [Mon, 4 Feb 2013 23:04:54 +0000 (10:04 +1100)]
Update version to 0.9.1

This is just for an update to DOC to regularise license
Signed-off-by: NeilBrown <neilb@suse.de>
11 years agoDOC: remove diff.ps due to distribution license issues.
NeilBrown [Mon, 4 Feb 2013 22:57:56 +0000 (09:57 +1100)]
DOC: remove diff.ps due to distribution license issues.

Replace with DOC/Algorithm which refers to the original document
and explains some of the differences.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoRelease 0.9 v0.9
Neil Brown [Mon, 14 May 2012 11:42:09 +0000 (21:42 +1000)]
Release 0.9

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoman page: add documentation for browse mode
Neil Brown [Mon, 14 May 2012 11:39:01 +0000 (21:39 +1000)]
man page: add documentation for browse mode

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: add a bit of colour to the file-list page.
Neil Brown [Mon, 14 May 2012 01:01:13 +0000 (11:01 +1000)]
Browser: add a bit of colour to the file-list page.

Set the colour of each file depending on whether it has
conflicts or wiggles or not.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMerge: allow merging a multi-patch patchfile.
Neil Brown [Mon, 14 May 2012 01:01:11 +0000 (11:01 +1000)]
Merge: allow merging a multi-patch patchfile.

If
  wiggle -p -r patchfilename
is given, multiple patches - each identifying the target
file - are read from patchfilename and each is applied to the
relevant file.  Note that '-r' is required with this usage of
-p.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomain: only pass training args to extract/do_diff/do_merge.
Neil Brown [Sun, 13 May 2012 23:17:35 +0000 (09:17 +1000)]
main: only pass training args to extract/do_diff/do_merge.

subtract/add optind to argc/argv before passing along.  That way
sub-functions don't need to access optind directly, and it will allow
us to pass other arg strings that are independent of optind.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMove parse_patch and related to new parse.c
Neil Brown [Sun, 13 May 2012 23:17:32 +0000 (09:17 +1000)]
Move parse_patch and related to new parse.c

... so we can use it from wiggle.c

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAllow load_file to load segments too.
Neil Brown [Sat, 12 May 2012 06:22:49 +0000 (16:22 +1000)]
Allow load_file to load segments too.

This will make it easier to process multi-file patches in
normal 'browse' mode.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMinor man-page fixes.
Neil Brown [Sat, 12 May 2012 05:59:19 +0000 (15:59 +1000)]
Minor man-page fixes.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoImprove make clean
Neil Brown [Sat, 12 May 2012 05:38:13 +0000 (15:38 +1000)]
Improve make clean

"make clean" was leaving some generated file around.
Better remove them.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAdd endian.h back to config.h
Neil Brown [Sat, 12 May 2012 05:37:08 +0000 (15:37 +1000)]
Add endian.h back to config.h

It turns out we do need it after all - but only include it if we
really do need it.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: improve decision on when to split window for merger view.
Neil Brown [Fri, 11 May 2012 09:42:24 +0000 (19:42 +1000)]
Browser: improve decision on when to split window for merger view.

Now that we are tracking in_conflict in the broswer we "know" when
we are in a conflict and so can only display the split window then,
rather than keeping some hysteresis until we leave any changes behind.
This makes large jumps ('N' 'P') display better.
Also don't allow hunk headers to look like a 'wiggled' section, because
they aren't really.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: improve rendering of conflicts in the the 'merge' view.
Neil Brown [Fri, 11 May 2012 09:30:22 +0000 (19:30 +1000)]
Browser: improve rendering of conflicts in the the 'merge' view.

I was ignoring the in_conflict value, so the 'original' side
of a conflict wasn't properly displayed, and so looked confusing.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowse: don't use background colors for added/deleted.
Neil Brown [Fri, 11 May 2012 03:48:00 +0000 (13:48 +1000)]
Browse: don't use background colors for added/deleted.

Coloured backgrounds are too loud.
So for added and deleted use red and green text.

Need to find a way to highlight lone spaces..

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowse: avoid display problems when changing view-mode.
Neil Brown [Fri, 11 May 2012 03:36:37 +0000 (13:36 +1000)]
Browse: avoid display problems when changing view-mode.

If we change mode so that the current end-of-line is no longer
visible, the display gets confused and add extra lines.  So when mode
changes, move backward then forward to ensure we are on a visibile
line.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoisolate_conflicts: don't look for eol that cannot be there.
Neil Brown [Thu, 10 May 2012 07:09:52 +0000 (17:09 +1000)]
isolate_conflicts: don't look for eol that cannot be there.

When looking for 'wiggles' we need to track whole lines
in the original file.  But when looking for an end-of-line
we shouldn't look at an merge-item that doesn't even
exist in the original file.

Reported-by: Chris Peterson <cpeterso@cpeterso.com>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoDon't include endian.h
Neil Brown [Thu, 10 May 2012 07:03:15 +0000 (17:03 +1000)]
Don't include endian.h

It turns out it isn't needed, and OS/X doesn't have it.

Reported-by: Chris Peterson <cpeterso@cpeterso.com>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agobrowser: display the type of the merge-node under the cursor.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
browser: display the type of the merge-node under the cursor.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: allow cursor to be displayed in alternate pane.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
Browser: allow cursor to be displayed in alternate pane.

This allows us to navigate all of the merge.
When in the alternate pane, movement is based on visibility there.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agobrowse/search: support selectively ignoring case.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
browse/search: support selectively ignoring case.

We ignore case only if no upper chars.
Leave possiblity for explicit request for case-match later.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agobrowse/search: don't match strings in the hunk-header.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
browse/search: don't match strings in the hunk-header.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: Support searching-again within the same line.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
Browser: Support searching-again within the same line.

This requires mcontains to know which direction we are searching in,
and whether we want a new match, or whether the old one will do.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: change searchdir to -1 or +1
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
Browser: change searchdir to -1 or +1

instead of 1 or 0.  It is less confusing that way.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: Extend proper cursor tracking to search.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
Browser: Extend proper cursor tracking to search.

Record the cursor in search anchors so we can go back to the
right location.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: Use KEY_BACKSPACE to recognise a backspace.
Neil Brown [Thu, 10 May 2012 06:44:10 +0000 (16:44 +1000)]
Browser: Use KEY_BACKSPACE to recognise a backspace.

It isn't always control-H

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBrowser: add a more effective cursor.
Neil Brown [Thu, 10 May 2012 06:44:07 +0000 (16:44 +1000)]
Browser: add a more effective cursor.

Create a proper cursor structure to track where on the screen we are.
Record the width of the current symbol so 'backward' works better.
Allow movement master start and end of line by going to previous or
next line.
Allow 'search' to locate the actual string, not just the line.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agobrowse: fix buffer underflow when closing directories.
Neil Brown [Wed, 9 May 2012 03:10:03 +0000 (13:10 +1000)]
browse: fix buffer underflow when closing directories.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAdd another regression-test
Neil Brown [Wed, 9 May 2012 02:51:27 +0000 (12:51 +1000)]
Add another regression-test

This is the test case that lead to the recent context improvements
and others.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoInitial all of 'End' merger.
Neil Brown [Tue, 8 May 2012 10:29:57 +0000 (20:29 +1000)]
Initial all of 'End' merger.

This avoids invalid mem access when checking for ends_line at End.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAvoid buffer overflow when checking for hunk header
Neil Brown [Tue, 8 May 2012 10:28:56 +0000 (20:28 +1000)]
Avoid buffer overflow when checking for hunk header

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomerge: avoid including large Unmatched sections in a conflict.
Neil Brown [Tue, 8 May 2012 09:56:38 +0000 (19:56 +1000)]
merge: avoid including large Unmatched sections in a conflict.

A large Unmatched section can just distract from the real conflict
and doesn't give useful information.
So if we can close the conflict before a big Unmatched,
do so.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoEncourage more context into conflict reports.
Neil Brown [Tue, 8 May 2012 08:54:11 +0000 (18:54 +1000)]
Encourage more context into conflict reports.

Conflict reports currently don't contain much surrounding
'Extraneous' text.  When the patch didn't really apply at all,
this context is very useful.
So encourage at least 3 lines of context from Extraneous or
Unchanged texts.
If it mostly comes from Unchanged text it isn't quite so useful,
so reduce the requirement.

Update self-tests to match.  In most cases these are an improvement.
In a couple of case we maybe get a bit more context than really
necessary, but that is better than not enough.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomerge: factor out is_cutpoint.
Neil Brown [Tue, 8 May 2012 07:09:23 +0000 (17:09 +1000)]
merge: factor out is_cutpoint.

We perform the same test several times, so make a function for it.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoImprove handling of hunk-header when merging.
Neil Brown [Tue, 8 May 2012 07:09:07 +0000 (17:09 +1000)]
Improve handling of hunk-header when merging.

If we are merging a patch, the patch will contain a number of
hunk-headers (essentially the @@ NN,MM @@) lines.

These should never appear in the merge, and must always line up with
end-of-line in the original as they represent a number of lines having
been deleted.

So:
  Cause these to each create a simple Extraneous merger, never
    combined with adjacent texts

  exclude them from any conflicts in isolate_conflict, so they
    can never appear in a merge

  Ensure that a preceeding 'Unmatched' finishes on an end-of-line.

Also update lots of self tests with improved results.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoEnsure that a hunk-header never appears in the middle of an Extraneous range.
Neil Brown [Tue, 8 May 2012 06:18:31 +0000 (16:18 +1000)]
Ensure that a hunk-header never appears in the middle of an Extraneous range.

A hunk header is always Extraneous.  However Extraneous text before it is
quite separate and is best kept separate.
Start a new Extraneous merger with each hunk header will make it easier
to detect hunk headers and handle them better.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agobrowser: clear the end of the split-window when needed.
Neil Brown [Mon, 7 May 2012 21:59:27 +0000 (07:59 +1000)]
browser: clear the end of the split-window when needed.

We would get some garbage when near the end of the diff.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAdd --show-wiggle flag.
Neil Brown [Mon, 7 May 2012 21:59:27 +0000 (07:59 +1000)]
Add --show-wiggle flag.

--show-wiggle modifies --merge so that chunks which need to be
wiggled into place are presented as full conflicts with an
extra stanza which shows what the resulting wiggle would look like.

Suggested-by: Alessandro Salvatori <sandr8@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoHandle some errors better in Browse mode.
Neil Brown [Mon, 7 May 2012 21:59:27 +0000 (07:59 +1000)]
Handle some errors better in Browse mode.

If the target file is missing or the patch is corrupt,
we really don't want to just crash.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMake tracing code a bit cleaner and more organised.
Neil Brown [Mon, 7 May 2012 21:59:27 +0000 (07:59 +1000)]
Make tracing code a bit cleaner and more organised.

 WIGGLE_TRACE=1 ./wiggle ....

will turn on tracing.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoIntroduce xmalloc and use it.
Neil Brown [Mon, 7 May 2012 21:59:27 +0000 (07:59 +1000)]
Introduce xmalloc and use it.

Instead of sometimes calling die() when malloc fails and
sometimes not, introduce xmalloc() which always reports a message
and dies, and use it uniformly.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoRefactor do_diff slightly
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Refactor do_diff slightly

Combine come code that is common to 'word' and 'line' branches.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoBetter error message if split_patch fails for --extract
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Better error message if split_patch fails for --extract

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoSplit do_diff_words and do_diff_lines out from do_diff
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Split do_diff_words and do_diff_lines out from do_diff

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMinor cleaning up in man page wiggle.1
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Minor cleaning up in man page wiggle.1

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoRemove extraction of base-name of command.
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Remove extraction of base-name of command.

We don't use this any more (as use of the name 'vpatch' was discarded)
so don't bother to extract it.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoSplit do_merge out from main() as a separate function.
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Split do_merge out from main() as a separate function.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoSplit do_diff() out from main()
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Split do_diff() out from main()

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agosplit 'extact' out of 'main' into a separate function.
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
split 'extact' out of 'main' into a separate function.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoReplace hash.h with better hash function from CCAN
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Replace hash.h with better hash function from CCAN

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoFix 'make version'
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
Fix 'make version'

Since I change the format for the version string, this hasn't worked.

NeilBrown <neilb@suse.de>

12 years ago.gitignore updates
Neil Brown [Mon, 7 May 2012 21:59:26 +0000 (07:59 +1000)]
.gitignore updates

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoGeneral cleanups
Neil Brown [Mon, 7 May 2012 21:59:21 +0000 (07:59 +1000)]
General cleanups

- spelling fixes
- remove ifdefed-out code
- white space adjustments
- etc

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoChangeLog-typo
Barak A. Pearlmutter [Sun, 19 Feb 2012 03:29:07 +0000 (14:29 +1100)]
ChangeLog-typo

option --quite should read --quiet

12 years agoTest condition was being ignored
Alexandre Carmel-Veilleux [Thu, 8 Dec 2011 02:46:56 +0000 (21:46 -0500)]
Test condition was being ignored

Signed-off-by: Neil Brown <neilb@suse.de>
12 years agoSilences warnings about set-but-not-used variables.
Neil Brown [Wed, 7 Dec 2011 23:22:46 +0000 (10:22 +1100)]
Silences warnings about set-but-not-used variables.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoRemoved malloc.h, fixed off-by-one in bestmatch.c, it was silent in Linux and deadly...
Alexandre Carmel-Veilleux [Fri, 2 Dec 2011 13:55:08 +0000 (08:55 -0500)]
Removed malloc.h, fixed off-by-one in bestmatch.c, it was silent in Linux and deadly on Mac OS X.

Signed-off-by: Neil Brown <neilb@suse.de>
12 years agoStuff from months ago that I forget why
Neil Brown [Wed, 7 Dec 2011 23:13:16 +0000 (10:13 +1100)]
Stuff from months ago that I forget why

But it looks ok

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoRemove merge.c
Neil Brown [Sun, 28 Aug 2011 07:59:57 +0000 (17:59 +1000)]
Remove merge.c

It hasn't been used for a while

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agovpatch cleanup
Neil Brown [Sun, 28 Aug 2011 07:57:54 +0000 (17:57 +1000)]
vpatch cleanup

add some comments and general clean ups.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoFix various typos in help messages.
Neil Brown [Fri, 26 Aug 2011 03:38:39 +0000 (13:38 +1000)]
Fix various typos in help messages.

I've obviously not proof-read this...

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoClean up bestmatch.c
Neil Brown [Wed, 24 Aug 2011 12:49:04 +0000 (22:49 +1000)]
Clean up bestmatch.c

Add lots of comments, remove some cruft etc.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoClean up split.c
Neil Brown [Wed, 24 Aug 2011 11:39:47 +0000 (21:39 +1000)]
Clean up split.c

Add/fix comments, remove unused function parameter.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoComment and tidy up diff.c
Neil Brown [Wed, 24 Aug 2011 11:29:27 +0000 (21:29 +1000)]
Comment and tidy up diff.c

Add lots of comments explaining algorithm. Change some
variable names and minor improvements.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoClean up more valgrind errors.
Neil Brown [Wed, 24 Aug 2011 06:28:34 +0000 (16:28 +1000)]
Clean up more valgrind errors.

Various issues found by watching valgrind.  Typically falling
one way or the other off the end of an array.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoUse Cmd var instread of "wiggle" in various error messages.
Neil Brown [Mon, 22 Aug 2011 11:18:35 +0000 (21:18 +1000)]
Use Cmd var instread of "wiggle" in various error messages.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoFix white space etc issues reported by checkpatch.pl
Neil Brown [Mon, 22 Aug 2011 11:18:29 +0000 (21:18 +1000)]
Fix white space etc issues reported by checkpatch.pl

i.e. checkpatch.pl from the linux kernel.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoUpdate date COPYING and FSF address.
Neil Brown [Mon, 22 Aug 2011 11:18:28 +0000 (21:18 +1000)]
Update date COPYING and FSF address.

Just addresses and license commentary change.  No change in license.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoFix use of uninitialised vars in merge2.
Neil Brown [Mon, 22 Aug 2011 11:18:26 +0000 (21:18 +1000)]
Fix use of uninitialised vars in merge2.

This makes valgrind happier.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAvoid use of undefined variable in bestmatch.
Neil Brown [Mon, 22 Aug 2011 08:08:08 +0000 (18:08 +1000)]
Avoid use of undefined variable in bestmatch.

When v->val is <= 0, v->k doesn't mean anything and isn't needed, so
avoid using it.  This helps make valgrind happy.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agonul terminate stream read from a file.
Neil Brown [Mon, 22 Aug 2011 08:08:02 +0000 (18:08 +1000)]
nul terminate stream read from a file.

Though we carry around the length of a string and so will not normally
need a nul terminator, we sometimes use sscanf which cannot take a
length and so needs nul termination.

So add a nul when loading from a file or stdin.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agodotest: Check if /usr/bin/time supports the needed functionality.
Neil Brown [Mon, 22 Aug 2011 04:28:20 +0000 (14:28 +1000)]
dotest: Check if /usr/bin/time supports the needed functionality.

Not all version of /usr/bin/time support -o and -f.  So test if the
installed one does and act accordingly.

Reported-by: Oliver Kiddle <oliver@kiddle.eu>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoStop using case ranges.
Neil Brown [Mon, 22 Aug 2011 04:28:20 +0000 (14:28 +1000)]
Stop using case ranges.

case a...b:
is gcc specific.  So don't use it - do an explicit range test instead.

Reported-by: Oliver Kiddle <oliver@kiddle.eu>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoAsk for more warnings and fix some.
Neil Brown [Mon, 22 Aug 2011 04:28:20 +0000 (14:28 +1000)]
Ask for more warnings and fix some.

In particular we were using strncmp without including string.h -
because memory.h automatically includes it..

Reported-by: Oliver Kiddle <oliver@kiddle.eu>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMake lots of functions "static".
Neil Brown [Mon, 22 Aug 2011 04:28:20 +0000 (14:28 +1000)]
Make lots of functions "static".

In particular isolate_conflicts() needs to be static to avoid a link
error with SUN's C compiler
Reported-by: Oliver Kiddle <oliver@kiddle.eu>
Also this shows that set_prefix() wasn't being used any more, so fix
that.

Signed-off-by: NeilBrown <neilb@suse.de>
13 years agoMakefile portability patch
Greg Ward [Fri, 25 Jun 2010 21:06:15 +0000 (17:06 -0400)]
Makefile portability patch

Don't run tests with sh, since sh is not always bash.

Signed-off-by: Neil Brown <neilb@suse.de>
14 years agoChange format of 'version' string
Neil Brown [Wed, 12 May 2010 06:35:31 +0000 (16:35 +1000)]
Change format of 'version' string

Based on suggestions from  Jari Aalto <jari.aalto@cante.net>

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoMore options for giving patches to --browse
Neil Brown [Wed, 12 May 2010 06:31:57 +0000 (16:31 +1000)]
More options for giving patches to --browse

As well as a 'patch' file (which identifies the target file by
names in the patch file), you can now also browse given a
target file plus a diff,
just the diff if it ends '.rej',
a target file plus old and new versions of the file.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoReadMe.c - spelling fix
Jari Aalto [Tue, 11 May 2010 06:12:30 +0000 (09:12 +0300)]
ReadMe.c - spelling fix

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Neil Brown <neilb@suse.de>
14 years agoUse git-archive to create a release
Neil Brown [Wed, 12 May 2010 02:36:12 +0000 (12:36 +1000)]
Use git-archive to create a release

it avoid unwanted files.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoWrite some notes about editting merges.
Neil Brown [Wed, 5 May 2010 07:06:53 +0000 (17:06 +1000)]
Write some notes about editting merges.

14 years agobrowse: allow selective listing of only files with wiggles or with conflicts.
Neil Brown [Sun, 4 Apr 2010 10:12:30 +0000 (20:12 +1000)]
browse: allow selective listing of only files with wiggles or with conflicts.

Signed-off-by: Neil Brown <neilb@suse.de>
14 years agobrowser: add help window
Neil Brown [Sun, 4 Apr 2010 09:23:18 +0000 (19:23 +1000)]
browser: add help window

Add display of help window on '?', and add
lots of help text for various modes.

Signed-off-by: Neil Brown <neilb@suse.de>
14 years agobrowser: rearrange code
Neil Brown [Sun, 4 Apr 2010 06:14:25 +0000 (16:14 +1000)]
browser: rearrange code

Put all the 'main window' code together, and all the
'merge window' code together.

Signed-off-by: Neil Brown <neilb@suse.de>
14 years agobrowser: first cut at horizontal split.
Neil Brown [Sun, 4 Apr 2010 06:07:41 +0000 (16:07 +1000)]
browser: first cut at horizontal split.

When in 'merge' mode we display the patch in a bottom window when on a
conflict or wiggle, so full context can be see.

This is a bit rough at the moment - the image jumps more than I would
like and it is hard to visually follow what is happening.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agobrowser: prev/next_melmnt to take mp not mpos.
Neil Brown [Sun, 4 Apr 2010 03:21:54 +0000 (13:21 +1000)]
browser: prev/next_melmnt to take mp not mpos.

As prev/next_melmnt only use the main 'struct mp' of an
mpos, it is less confusing to only give them that to work on.

Signed-off-by: Neil Brown <neilb@suse.de>
14 years agobrowse: never leave blank space above
Neil Brown [Sat, 3 Apr 2010 23:15:41 +0000 (09:15 +1000)]
browse: never leave blank space above

Having blank space above the display looks
ugly, so if some appears, refresh to remove it.
Also get 'control-L' to recenter as well as refresh.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agobrowser: Minor search improvements
Neil Brown [Sat, 3 Apr 2010 22:33:30 +0000 (08:33 +1000)]
browser: Minor search improvements

We still don't get control-s through though.

Signed-off-by: Neil Brown <neilb@suse.de>
14 years agobrowser: move check_line call
Neil Brown [Sat, 3 Apr 2010 22:24:53 +0000 (08:24 +1000)]
browser: move check_line call

instead of calling before eac call to draw_mline, call it
inside draw_mline instead.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoAdd some tracing to browser
Neil Brown [Sat, 3 Apr 2010 22:16:23 +0000 (08:16 +1000)]
Add some tracing to browser

Allow examining each element/pos in the current context

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoBrowser: add line number tracking.
Neil Brown [Sat, 3 Apr 2010 13:08:56 +0000 (00:08 +1100)]
Browser: add line number tracking.

Useful for matching against linenos given in patch.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agobrowser: display patch chunk headers in 'diff' output.
Neil Brown [Fri, 2 Apr 2010 05:37:05 +0000 (16:37 +1100)]
browser: display patch chunk headers in 'diff' output.

When showing 'before' of 'after' text which comes from a patch,
display the chunk header:
   @@ xx,yy +aa,bb @@

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoSignificant browser update.
Neil Brown [Fri, 2 Apr 2010 04:31:59 +0000 (15:31 +1100)]
Significant browser update.

wiggle -B
is getting closer to what I wanted.  Lots of dead code removed
and lots of fine details tidied up.
Usage is a bit different in that we don't always see a split
window.

Various sundry changes like .gitignore and "make demo.path"

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoFORTIFY_SOURCE fixes
Neil Brown [Wed, 24 Mar 2010 10:49:58 +0000 (21:49 +1100)]
FORTIFY_SOURCE fixes

Fix a buffer overflow, some unused values, and some uninitialised variables.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoRelease 0.8 v0.8
Neil Brown [Wed, 24 Mar 2010 09:30:14 +0000 (20:30 +1100)]
Release 0.8

Added some patches to resolve issues raise for openSUSE package.

14 years agoAdd --no-ignore option
Neil Brown [Wed, 24 Mar 2010 08:03:39 +0000 (19:03 +1100)]
Add --no-ignore option

This suppresses the optimisation of ignoring conflicts which appear to
be making a change that had already been made.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoImprove parsing of diff3 output.
Neil Brown [Wed, 24 Mar 2010 07:53:02 +0000 (18:53 +1100)]
Improve parsing of diff3 output.

When diff3 discovers the the 1st and 3rd files match, but differ from
the 2nd it reports:

<<<<<<<
content from second file
=======
content from 1st and 3rd file
>>>>>>>

without a ||||||| line at all.

Enhance the extract code to recognise this.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoUpdate wiggle.spec for new version and location.
Neil Brown [Wed, 24 Mar 2010 07:52:30 +0000 (18:52 +1100)]
Update wiggle.spec for new version and location.

14 years agoRelease version 0.7 devel v0.7
Neil Brown [Wed, 24 Mar 2010 06:30:14 +0000 (17:30 +1100)]
Release version 0.7

After nearly 7 years...

14 years agovpatch: silence a compiler warning.
Neil Brown [Wed, 24 Mar 2010 06:28:03 +0000 (17:28 +1100)]
vpatch: silence a compiler warning.

Apparently attrset seems to return a value so we need
to explicitly ignore it.

Signed-off-by: NeilBrown <neilb@suse.de>